// 定义一个一维数组，存储10个学生的成绩，求平均成绩
#include <stdio.h>
#include <string.h>
int main(int argc, char const *argv[])
{
    int total = 10;
    double sum = 0;
    double grades[total];
    memset(grades, 0, sizeof(grades));

    for (int i = 0; i < total; i++)
    {
        printf("请输入第%d位学生的成绩：", i + 1);
        scanf("%lf", &grades[i]);
        sum = sum + grades[i];
    }
    printf("该班%d个学生的平均成绩为：%.2lf\n", total, sum / total);

    return 0;
}
